/**
 * 获取起草文稿-》材料征集详情mixins
 */
import {getMaterialDetail} from "@/api/fileTask";
import {getfileinfopage} from "@/api/system"
import {getNotNull,dealStartEndDate,getFileTypeFiles} from '@/views/util'
import {REVIEW_DIC} from '@/const/dict'
export default function () {
  return {
    data() {
      return {
        materialDetailData:[],
        // 材料清单附件
        materialFileTypeIds:{},
      }
    },
    methods: {
      getDetailData_Material(id) {
        getMaterialDetail(id).then(async response => {
          var records = response.data.data
          let files = await getFileTypeFiles(records.fileIds)
          this.materialDetailData = [
            {label: '名称', value: getNotNull(records.title)},
            {label: '部门名称', value: getNotNull(records.deptName)},
            {label: '材料要求', value: getNotNull(records.description)},
            {label: '创建时间', value: getNotNull(records.createTime)},
            {label: '附件', files:files},
          ]
        })
      },
    }
  }
}
